<?php
/**
 * Created by PhpStorm.
 * Clerk: Administrator
 * Date: 2018/8/29
 * Time: 19:00
 */
namespace app\admin\model;


use think\Db;
use think\Model;

class Order extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    public static function getOrderMoney($time){
        $data = Db::name('order')
            ->where('create_time','>',$time[0])
            ->where('create_time','<=',$time[1])
            ->where('isdelete','=','0')
            ->where('order_status','=','4')
            ->sum('order_money');
        return $data;
    }

}